package com.testatguigu.myRule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.ribbon.Ribbon;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RibbonRule {
//    Ribbon负载均衡
//    IRule接口下的实现类为负载均衡算法的
    @Bean
    public IRule iRule(){
        return new RandomRule();
    }
}
